package com.alignet.gn.hibernate;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.MappedSuperclass;

/**
 * AbstractTgnPassword entity provides the base persistence definition of the
 * TgnPassword entity. @author MyEclipse Persistence Tools
 */
@MappedSuperclass
public abstract class AbstractTgnPassword implements java.io.Serializable {

    // Fields

    private Integer inIdpassword;
    private TgnUser tgnUser;
    private String vcPwd;
    private Integer inIduserreg;
    private Timestamp dtRegistry;

    // Constructors

    /** default constructor */
    public AbstractTgnPassword() {
    }

    /** minimal constructor */
    public AbstractTgnPassword(Integer inIdpassword, TgnUser tgnUser,
	    Integer inIduserreg, Timestamp dtRegistry) {
	this.inIdpassword = inIdpassword;
	this.tgnUser = tgnUser;
	this.inIduserreg = inIduserreg;
	this.dtRegistry = dtRegistry;
    }

    /** full constructor */
    public AbstractTgnPassword(Integer inIdpassword, TgnUser tgnUser,
	    String vcPwd, Integer inIduserreg, Timestamp dtRegistry) {
	this.inIdpassword = inIdpassword;
	this.tgnUser = tgnUser;
	this.vcPwd = vcPwd;
	this.inIduserreg = inIduserreg;
	this.dtRegistry = dtRegistry;
    }

    // Property accessors
    @Id
    @Column(name = "IN_IDPASSWORD", unique = true, nullable = false)
    public Integer getInIdpassword() {
	return this.inIdpassword;
    }

    public void setInIdpassword(Integer inIdpassword) {
	this.inIdpassword = inIdpassword;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "IN_IDUSER", nullable = false)
    public TgnUser getTgnUser() {
	return this.tgnUser;
    }

    public void setTgnUser(TgnUser tgnUser) {
	this.tgnUser = tgnUser;
    }

    @Column(name = "VC_PWD", length = 30)
    public String getVcPwd() {
	return this.vcPwd;
    }

    public void setVcPwd(String vcPwd) {
	this.vcPwd = vcPwd;
    }

    @Column(name = "IN_IDUSERREG", nullable = false)
    public Integer getInIduserreg() {
	return this.inIduserreg;
    }

    public void setInIduserreg(Integer inIduserreg) {
	this.inIduserreg = inIduserreg;
    }

    @Column(name = "DT_REGISTRY", nullable = false, length = 26)
    public Timestamp getDtRegistry() {
	return this.dtRegistry;
    }

    public void setDtRegistry(Timestamp dtRegistry) {
	this.dtRegistry = dtRegistry;
    }

}